package com.ht.yml.tools;

import java.util.Map;

/**
 * @author wangmin
 * @discription
 * @created 2024-12-30 10:50
 */
public class TesterForValidateForOldPropertyFile {
    public static void main(String[] args) throws Exception {
        final String env = "dev";

        final Map<String, Object> apolloAllConfigMap = ApolloConfigUtils.loadApolloConfigs(Const.destAppId, "app_const.yaml,"+env+".yaml");
        System.out.println("apolloAllConfigs:");
        String apolloAll_yamlStr = YamlReader.dump(apolloAllConfigMap);
        System.out.println(apolloAll_yamlStr);
        System.out.println("\n\n\n");

        final Map<String, Object> applicationAllConfigMap = ApplicationConfigUtils.generateApplicationConfigMapByPropertyFile(env);
        System.out.println("applicationAllConfigMap:");
        String applicationAll_yamlStr = YamlReader.dump(applicationAllConfigMap);
        System.out.println(applicationAll_yamlStr);
        System.out.println("\n\n\n");

        YamlPropertiesUtils.compare(apolloAllConfigMap, "apollo", applicationAllConfigMap, "配置文件");
    }


}
